<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="{:url('Nav/index')}">导航管理</a></li>
        <li><a href="{:url('Nav/add')}">添加导航</a></li>
    </ul>

    <form class="well form-inline margin-top-20" method="get" action="{:url('Nav/index')}">
        用户名:
        <input type="text" class="form-control" name="keyword"  value="{:input('request.keyword/s','')}" placeholder="支持标题，作者搜索">
        <input type="submit" class="btn btn-primary" value="搜索" />
        <a class="btn btn-danger" href="{:url('Nav/index')}">清空</a>
    </form>

    <form method="post" class="js-ajax-form margin-top-20" action="{:url('Nav/order')}">
        <div class="table-actions">
          <button type="submit" class="btn btn-primary btn-sm js-ajax-submit">排序</button>
        </div>
        <table class="table table-hover table-bordered table-list">
            <thead>
            <tr>
                <th width="16"><label><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x"></label></th>
                <th width="50">排序</th>
                <th width="50">ID</th>
                <th>标题</th>
                <th>图片</th>
                <th>网址</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <volist name="nav" id="v">
               <tr>
                <td><input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]"></td>
                   <td><input type="text" value="{$v.list_order}" name="list_orders[{$v.id}]" style="width:50px;"></td>
                   <td>{$v.id}</td>
                <td>{$v.title}</td>
                <td>
                       <img class="img-thumbnail" style="width: 50px; height:50px;" src="/upload/{$v.image}" />
                </td>
                <td>{$v.url}</td>
                <td>
                    <a class="btn btn-xs btn-primary" href="{:url('Nav/edit',['id'=>$v['id']])}">操作</a>
                    <a class="btn btn-xs btn-danger js-ajax-delete" href="{:url('Nav/del',['id'=>$v['id']])}">
                       删除
                    </a>
                </td>
            </tr>
            </volist>>
            </tbody>

        </table>
<!--        分页-->
        <div class="pagination">
            {$nav->render()}
        </div>
    </form>
</div>
<script src="__STATIC__/js/admin.js?v={$_static_version}"></script>
</body>
</html>